//
//  STDSIAPTool.h
//  STDSVideo
//
//  Created by 2022_cgp on 2021/1/11.
//  Copyright © 2021 stdstb. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <XYIAPKit/XYIAPKit.h>
NS_ASSUME_NONNULL_BEGIN

@interface CAIAPTool : NSObject

+ (instancetype)shareTool;
@property (nonatomic, copy) NSArray *products;

- (void)ca_requestAllProductWithCompletion:(nullable void (^)(BOOL, NSString * _Nonnull msg))completion;

- (void)ca_buyProductWithId:(NSString *)productId
                 completion:(void (^)(BOOL, NSString * _Nonnull, SKPaymentTransaction *transaction))completion;

- (void)ca_restoreProductWithCompletion:(void (^)(BOOL, NSString * _Nonnull))completion;

@end

NS_ASSUME_NONNULL_END
